import { defineStore } from 'pinia'
import {useUserStore} from '@store/useUserStore'
import {useMenuStore} from '@store/useMenuStore'
export const useKeepStore = defineStore('keepId', {
    state: () => {
        return {
            // 要缓存的组件名称
            keepAliveRoute:['仪表盘'] as any
        }
    },
    getters:{},
    actions:{
        pushKeepAlive(name){
            if(!this.keepAliveRoute.includes(name)){
                this.keepAliveRoute.push(name)
            }
        }
    },
})